package com.freecloud.bitorrent.constant;

import com.freecloud.bitorrent.common.util.NetworkUtil;
import com.freecloud.bitorrent.common.util.NodeIdUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * 本机节点信息
 *
 * @Author: maomao
 * @Date: 2022/7/15 5:16 PM
 */
@Slf4j
public class LocalNodeConstant {
    /**
     * 本机IP地址
     */
    public static final String ip = NetworkUtil.getIp();
    //    public static final String ip = "124.65.223.110";

    //    public static final String ip = NetUtil.getIpByHost("0.tcp.jp.ngrok.io");
    /**
     * 本机NodeId编码
     */
    public static final byte[] nodeId = NodeIdUtil.randSelfNodeId(ip);
}
